💥 Add transfer type payload conversion hooks#1655
Open
tconley1428 wants to merge 9 commits into
Open
Conversation
This was referenced Jul 16, 2026
tconley1428
force-pushed
the
nexus-generated-model-wire-converter
branch
from
July 21, 2026 15:46
c0bd968 to
041bb17
Compare
tconley1428
force-pushed
the
nexus-generated-model-wire-converter
branch
from
July 21, 2026 15:50
041bb17 to
844deb0
Compare
tconley1428
marked this pull request as ready for review
July 21, 2026 18:12
tconley1428
force-pushed
the
nexus-generated-model-wire-converter
branch
from
July 21, 2026 18:31
5cf9231 to
51825ac
Compare
eamsden
requested changes
Jul 21, 2026
tconley1428
force-pushed
the
nexus-generated-model-wire-converter
branch
from
July 21, 2026 19:47
2f7d1a3 to
2a1af11
Compare
eamsden
approved these changes
Jul 22, 2026
eamsden
left a comment
Contributor
There was a problem hiding this comment.
Please make sure the change to get_payload_converter is also called out as breaking
tconley1428
force-pushed
the
nexus-generated-model-wire-converter
branch
4 times, most recently
from
July 22, 2026 17:24
a2e1a8f to
8a32052
Compare
tconley1428
force-pushed
the
nexus-generated-model-wire-converter
branch
from
July 22, 2026 17:48
8a32052 to
e3c5314
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds experimental SDK payload-converter support for values and type hints decorated with
@transfer_type_convertible(...)using aTransferTypeConverterclass.The converter maps a user value to the transfer type handed to the configured payload converter, and maps the decoded transfer type back to the user value. This keeps normal SDK payload-converter behavior in one place, including codec handling and serialization-context propagation.
The general transfer type hook is intentionally pure and does not receive a payload converter. System Nexus conversion obtains its configured user payload converter through private SDK context when generated system models need to process nested user payloads.
This change:
TransferTypeConverterABC andtransfer_type_convertible(...)decoratorDataConvertercreates themTransferTypeConverter.transfer_typedecode hint; when absent, the wrapped converter decodes without an inner type hintBreaking changes:
WorkflowInstanceDetailsmust now passpayload_converter_factoryinstead ofpayload_converter_class.temporalio.nexus.systemAPIs are experimental and subject to change.Validation:
./.venv/bin/pytest tests/test_converter.py -qpoe lint